<?php
return [
    '360kan' => [
        'indexlist' => [
            'title' => ['ul:eq(10) .s1', 'text', ''],
            'href' => ['ul:eq(10) a.js-link', 'href', ''],
            'img' => ['ul:eq(10) .js-playicon img', 'data-src', ''],
            'pf' => ['ul:eq(10) .s2', 'text', ''],
            'js' => ['ul:eq(10) .w-newfigure-hint', 'text'],
        ],
        'indexbanner' => [
            'title' => ['ul[class="b-topslider-btns js-slide-btns"]>li>a', 'text', ''],
            'img' => ['ul[class="b-topslider-btns js-slide-btns"]>li', 'data-cover', ''],
            'href' => ['ul[class="b-topslider-btns js-slide-btns"]>li', 'data-href', '', function ($content) {
                $url = str_replace(['https://', 'www.360kan.com','http://'], '', $content);
                return base64_encode($url);
            }]
        ],
        'dianying' => [
            'title' => ['.s1', 'text', ''],
            'href' => ['a', 'href', '', function ($content) {
                return base64_encode($content);
            }],
            'img' => ['a>.cover.g-playicon>img', 'src', ''],
            'pf' =>  ['.point', 'text', ''],
            'year' => ['.hint', 'text'],
            'star' => ['.star', 'text', '']
        ],
        'dianshi' => [
            'title' => ['.s1', 'text', ''],
            'href' => ['a.js-tongjic', 'href', '', function ($content) {
                return base64_encode($content);
            }],
            'img' => ['img', 'src', ''],
            'js' => ['.hint', 'text', ''],
            'star' => ['.star', 'text', '']
        ],
        'zongyi' => [
            'title' => ['.s1', 'text', ''],
            'href' => ['a.js-tongjic', 'href', '', function ($content) {
                return base64_encode($content);
            }],
            'img' => ['img', 'src', ''],
            'js' => ['.hint', 'text', ''],
            'star' => ['.star', 'text', '']
        ],
        'dongman' => [
            'title' => ['.s1', 'text', ''],
            'href' => ['a.js-tongjic', 'href', '', function ($content) {
                return base64_encode($content);
            }],
            'img' => ['img', 'src', ''],
            'js' => ['.hint', 'text', ''],
        ],
        'dyplay' => [
            'title' => ['.title-left.g-clear h1', 'text', ''],
            'img' => ['.s-cover>a>img', 'src', ''],
            'vtype' => ['#js-desc-switch>div>p:eq(0)', 'text', ''],
            'year' => ['#js-desc-switch>div>p:eq(1)', 'text', ''],
            'location' => ['#js-desc-switch>div>p:eq(2)', 'text', ''],
            'actor' => ['#js-desc-switch>div>.item-actor', 'text', ''],
            'director' => ['#js-desc-switch>div>p:eq(4)', 'text', ''],
            'desc' => ['.js-close-wrap .item-desc', 'text', '-span'],
            'name' => ['.top-list-zd.g-clear a[data-daochu^="to="]', 'text', '-span'],
            'href' => ['.top-list-zd.g-clear a[data-daochu^="to="]', 'href', '', function ($content) {
                if (strpos($content, 'cps') && strpos($content, 'youku')) {
                    $arr = explode('&', $content);
                    $url = str_replace('url=', '', $arr['1']);
                    return $url;

                } else {
                    if (strpos($content, '?')) {
                        $lenth = strpos($content, '?');
                        return substr($content, 0, $lenth);
                    } else {
                        return $content;
                    }

                }

            }]
        ],
        'zyplay' => [
            'title' => ['.title-left.g-clear h1', 'text', ''],
            'img' => ['.s-cover>a>img', 'src', ''],
            'name' => ['.ea-site', 'text', ''],
            'vtype' => ['#js-desc-switch>div>p:eq(0)', 'text', ''],
            'year' => ['#js-desc-switch>div>p:eq(1)', 'text', ''],
            'location' => ['#js-desc-switch>div>p:eq(2)', 'text', ''],
            'director' => ['#js-desc-switch>div>p:eq(3)', 'text', ''],
            'actor' => ['#js-desc-switch>div>p:eq(4)', 'text', ''],
            'desc' => ['.js-close-wrap .item-desc', 'text', '-span'],
            'js' => ['.js-month-page>ul>li .w-newfigure-hint', 'text', ''],
            'href' => ['.js-month-page>ul>li>a', 'href'],
            'time' => ['.js-year-page .w-newfigure-hint', 'text', '']
        ],
        'tvplay' => [
            'title' => ['.title-left.g-clear h1', 'text', ''],
            'img' => ['.s-cover>a>img', 'src', ''],
            'totaljs' => ['p[class="tag"]', 'text', ''],
            'vtype' => ['#js-desc-switch>div>p:eq(0)', 'text', ''],
            'year' => ['#js-desc-switch>div>p:eq(1)', 'text', ''],
            'location' => ['#js-desc-switch>div>p:eq(2)', 'text', ''],
            'actor' => ['#js-desc-switch>div>.item-actor', 'text', ''],
            'director' => ['#js-desc-switch>div>.item-director ', 'text', ''],
            'desc' => ['.js-close-wrap .item-desc', 'text', '-span'],
        ],
        'dmplay' => [
            'title' => ['.title-left.g-clear h1', 'text', ''],
            'img' => ['.s-cover>a>img', 'src', ''],
            'vtype' => ['#js-desc-switch>div>p:eq(0)', 'text', ''],
            'year' => ['#js-desc-switch>div>p:eq(1)', 'text', ''],
            'location' => ['#js-desc-switch>div>p:eq(2)', 'text', ''],
            'actor' => ['#js-desc-switch>div>.item-actor', 'text', ''],
            'director' => ['#js-desc-switch>div>.item-director', 'text', ''],
            'desc' => ['.item-desc:eq(1)', 'text', '-span'],
        ],

        'tvlist' => [
            'js' => ['[class="num-tab-main g-clear js-tab"] a[data-daochu^="to="]', 'text', ''],
            'href' => ['[class="num-tab-main g-clear js-tab"] a[data-daochu^="to="]', 'href', '', function ($content) {
                if (strpos($content, 'cps') && strpos($content, 'youku')) {
                    $arr = explode('&', $content);
                    $url = str_replace('url=', '', $arr['1']);
                    return $url;

                } else {
                    if (strpos($content, '?')) {
                        $lenth = strpos($content, '?');
                        return substr($content, 0, $lenth);
                    } else {
                        return $content;
                    }

                }

            }],
        ],
        'search' => [
            'title' => ['.cont h3 a', 'text', ''],
            'href' => ['.cont h3 a', 'href', '', function ($content) {
                $url = str_replace(['http://', 'https://', 'www.360kan.com'], '', $content);
                return base64_encode($url);
            }],
            'img' => ['.m-mainpic img', 'src', ''],
            'vtype' => ['.cont .playtype', 'text', ''],
            'desc' => ['.m-description', 'text','-i -a']
        ],
        'zongyibd' => [
            'title' => ['.p-mod>.content>ul>li .s1', 'text', ''],
            'href' => ['.p-mod>.content>ul>li a', 'href', '', function ($content) {
                $url = str_replace(['http://', 'https://', 'www.360kan.com'], '', $content);
                return base64_encode($url);
            }],
            'img' => ['.p-mod>.content>ul>li img', 'data-src', ''],
            'js' => ['.p-mod>.content>ul>li .w-newfigure-hint', 'text', ''],
            'desc' => ['.p-mod>.content>ul>li .w-newfigure-desc', 'text', ''],
        ],
        'dianshibd' => [
            'title' => ['.sync.p-mod>.content>ul>li .s1', 'text', ''],
            'href' => ['.sync.p-mod>.content>ul>li a', 'href', '', function ($content) {
                $url = str_replace(['http://', 'https://', 'www.360kan.com'], '', $content);
                return base64_encode($url);
            }],
            'img' => ['.sync.p-mod>.content>ul>li img', 'data-src', ''],
            'js' => ['.sync.p-mod>.content>ul>li .w-newfigure-hint', 'text', ''],
            'desc' => ['.sync.p-mod>.content>ul>li .w-newfigure-desc', 'text', ''],
        ],
        'dongmanbd' => [
            'title' => ['.dongman .content1>ul>li .s1', 'text', ''],
            'href' => ['.dongman .content1>ul>li a', 'href', '', function ($content) {
                $url = str_replace(['http://', 'https://', 'www.360kan.com'], '', $content);
                return base64_encode($url);
            }],
            'img' => ['.dongman .content1>ul>li img', 'data-src', ''],
            'js' => ['.dongman .content1>ul>li .w-newfigure-hint', 'text', ''],
            'desc' => ['.dongman .content1>ul>li .w-newfigure-desc', 'text', ''],
        ],

        'dianyingbd1' => [
            'title' => ['[class="m-rank g-wrap p-mod js-rank"] .content>ul:eq(1)>li .s1', 'text', ''],
            'href' => ['[class="m-rank g-wrap p-mod js-rank"] .content>ul:eq(1)>li a', 'href', '', function ($content) {
                $url = str_replace(['http://', 'https://', 'www.360kan.com'], '', $content);
                return base64_encode($url);
            }],
            'img' => ['[class="m-rank g-wrap p-mod js-rank"] .content>ul:eq(1)>li img', 'data-src', ''],
            'year' => ['[class="m-rank g-wrap p-mod js-rank"] .content>ul:eq(1)>li .w-newfigure-hint', 'text', ''],
            'pf' => ['[class="m-rank g-wrap p-mod js-rank"] .content>ul:eq(1)>li .s2', 'text', ''],
            'desc' => ['[class="m-rank g-wrap p-mod js-rank"] .content>ul:eq(1)>li .w-newfigure-desc', 'text', ''],
        ],
        'dianyingbd' => [
            'title' => ['.s1', 'text', ''],
            'href' => ['a', 'href', '', function ($content) {
                $url = str_replace(['http://', 'https://', 'www.360kan.com'], '', $content);
                return base64_encode($url);
            }],
            'img' => ['img', 'data-src', ''],
            'year' => ['.w-newfigure-hint', 'text', ''],
            'pf' => ['.s2', 'text', ''],
            'desc' => ['.w-newfigure-desc', 'text', ''],
        ],
        'tvlike' => [
            'title' => ['.s-guess-list .title', 'text', ''],
            'href' => ['.s-guess-list .title a', 'href', '', function ($content) {
                return base64_encode($content);
            }],
            'img' => ['.s-guess-list li .js-playicon img', 'data-src', '']
        ],
        'dmlike' => [
            'title' => ['.m-guess-list .title', 'text', ''],
            'href' => ['.m-guess-list .title a', 'href', '', function ($content) {
                return base64_encode($content);
            }],
            'img' => ['.m-guess-list li .js-playicon img', 'data-src', '']
        ],
        'zylike' => [
            'title' => ['div[class="s-guess-right"] .title', 'text', ''],
            'href' => ['div[class="s-guess-right"] a', 'href', '', function ($content) {
                return base64_encode($content);
            }],
            'img' => ['a[class="s-guess-left g-playicon js-playicon"] img', 'data-src']
        ],
        'dylike' => [
            'title' => ['#js-guessb .title', 'text', ''],
            'href' => ['#js-guessb .title>a', 'href', '', function ($content) {
                return base64_encode($content);
            }],
            'img' => ['#js-guessb img', 'data-src']
        ]


    ]
];